﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
using Volo.Abp;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Bridge.Shared.Enums.Wms;

namespace Vouchers
{
    public class VoucherBase : AuditedAggregateRoot<Guid>, ISoftDelete, IMultiTenant
    {
        public bool IsDeleted { get; set; } = false;

        public Guid? TenantId { get; set; }

        /// <summary>
        /// 单据编号
        /// </summary>
        [Comment("单据编号")]
        [MaxLength(100)]
        public string VoucherCode { get; set; }

         [MaxLength(100)]
         [Comment("产品大类名称")]
       public string ProductClassName { get; set; }

        [MaxLength(36)]
        [Comment("产品大类ID")]
        public Guid ProductClassId { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(200)]
        [Comment("备注")]
        public string Remark { get; set; }
        /// <summary>
        /// 总数量
        /// </summary>
        [Comment("总数量")]
        [Column(TypeName = "decimal(10,2)")]
        public decimal? TotalCount { get; set; }

        /// <summary>
        /// 总金额
        /// </summary>
        [Comment("总金额")]
        [Column(TypeName = "decimal(18,4)")]
        public decimal? TotalAmount { get; set; }
        [Comment("是否推送his 0-未推送 1-已推送")]
        public bool IsPushHis { get; set; }

        [Comment("打印状态 0-未打印 1-已打印")]
        public bool IsPrint { get; set; }

        [Comment("0暂存 -1已作废 1已提交 2已驳回 3已审核")]
        public OrderStatusEnum Status { get; set; }
        [Comment("审核时间")]
        public DateTime AuditOn { get; set; }

        [MaxLength(20)]
        [Comment("审核人")]
        public string AuditBy { get; set; }

        [Comment("制单人")]
        [MaxLength(50)]
        public string CreatedBy { get; set; }

        [Comment("制单时间")]
        public DateTime? CreatedOn { get; set; }

        [MaxLength(50)]
        [Comment("来源")]
        public string Source { get; set; }

        [Comment("驳回理由")]
        [MaxLength(500)]
        public string ReasonRejection { get; set; }
    }
}
